package gui;

import javax.swing.JFrame;
import java.awt.Dimension;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.JComboBox;
import javax.swing.JButton;
import javax.swing.JTextField;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JProgressBar;

public class Order1 extends JFrame{

	private JPanel order1 = null;
	private JLabel jLabelMainOrder = null;
	private JLabel jLabelItemName = null;
	private JComboBox jComboBoxItems = null;
	private JButton jButtonGoToCatalog = null;
	private JLabel jLabelPrice = null;
	private JTextField jTextFieldStartPrice = null;
	private JLabel jLabelEndPrice = null;
	private JTextField jTextFieldEndPrice = null;
	private JLabel jLabelPriceRange = null;
	private JButton jButtonHelp = null;
	private JButton jButtonExit = null;
	private JButton jButtonNext = null;
	private JLabel jLabelColor = null;
	private JComboBox jComboBoxColor = null;
	private JButton jButtonCustomOrder = null;
	private JList jListResults = null;
	private JProgressBar jProgressBar = null;
	private JButton jButtonSearch = null;
	/**
	 * This method initializes 
	 * 
	 */
	public Order1() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 */
	private void initialize() {
        this.setSize(new Dimension(600, 600));
        this.setContentPane(getOrder1());
        this.setTitle("ORDER");
			
	}

	/**
	 * This method initializes order1	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getOrder1() {
		if (order1 == null) {
			jLabelColor = new JLabel();
			jLabelColor.setBounds(new Rectangle(30, 286, 121, 32));
			jLabelColor.setText("DOMINATIN COLOR:");
			jLabelPriceRange = new JLabel();
			jLabelPriceRange.setBounds(new Rectangle(235, 193, 92, 32));
			jLabelPriceRange.setText("PRICE RANGE");
			jLabelEndPrice = new JLabel();
			jLabelEndPrice.setBounds(new Rectangle(252, 242, 49, 27));
			jLabelEndPrice.setText("UNTIL:");
			jLabelPrice = new JLabel();
			jLabelPrice.setBounds(new Rectangle(29, 242, 55, 27));
			jLabelPrice.setText("FROM:");
			jLabelItemName = new JLabel();
			jLabelItemName.setBounds(new Rectangle(30, 150, 105, 32));
			jLabelItemName.setText("ITEM TYPE:");
			jLabelMainOrder = new JLabel();
			jLabelMainOrder.setBounds(new Rectangle(59, 14, 453, 93));
			jLabelMainOrder.setText("MAKE AN ORDER (pic)");
			order1 = new JPanel();
			order1.setLayout(null);
			order1.add(jLabelMainOrder, null);
			order1.add(jLabelItemName, null);
			order1.add(getJComboBoxItems(), null);
			order1.add(getJButtonGoToCatalog(), null);
			order1.add(jLabelPrice, null);
			order1.add(getJTextFieldStartPrice(), null);
			order1.add(jLabelEndPrice, null);
			order1.add(getJTextFieldEndPrice(), null);
			order1.add(jLabelPriceRange, null);
			order1.add(getJButtonHelp(), null);
			order1.add(getJButtonExit(), null);
			order1.add(getJButtonNext(), null);
			order1.add(jLabelColor, null);
			order1.add(getJComboBoxColor(), null);
			order1.add(getJButtonCustomOrder(), null);
			order1.add(getJListResults(), null);
			order1.add(getJProgressBar(), null);
			order1.add(getJButtonSearch(), null);
		}
		return order1;
	}

	/**
	 * This method initializes jComboBoxItems	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getJComboBoxItems() {
		if (jComboBoxItems == null) {
			jComboBoxItems = new JComboBox();
			jComboBoxItems.setBounds(new Rectangle(150, 150, 256, 32));
			jComboBoxItems.addItem(null);
			jComboBoxItems.addItem("Flower");
			jComboBoxItems.addItem("Plant");
			jComboBoxItems.addItem("Tree");
			jComboBoxItems.addItem("Flower Arrangement");
			jComboBoxItems.addItem("Flower Cluster");
		}
		return jComboBoxItems;
	}

	/**
	 * This method initializes jButtonGoToCatalog	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonGoToCatalog() {
		if (jButtonGoToCatalog == null) {
			jButtonGoToCatalog = new JButton();
			jButtonGoToCatalog.setBounds(new Rectangle(420, 150, 90, 33));
			jButtonGoToCatalog.setText("CATALOG");
		}
		return jButtonGoToCatalog;
	}

	/**
	 * This method initializes jTextFieldStartPrice	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextFieldStartPrice() {
		if (jTextFieldStartPrice == null) {
			jTextFieldStartPrice = new JTextField();
			jTextFieldStartPrice.setBounds(new Rectangle(100, 242, 136, 27));
		}
		return jTextFieldStartPrice;
	}

	/**
	 * This method initializes jTextFieldEndPrice	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextFieldEndPrice() {
		if (jTextFieldEndPrice == null) {
			jTextFieldEndPrice = new JTextField();
			jTextFieldEndPrice.setBounds(new Rectangle(321, 242, 136, 27));
		}
		return jTextFieldEndPrice;
	}

	/**
	 * This method initializes jButtonHelp	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonHelp() {
		if (jButtonHelp == null) {
			jButtonHelp = new JButton();
			jButtonHelp.setBounds(new Rectangle(15, 510, 106, 45));
			jButtonHelp.setText("HELP");
		}
		return jButtonHelp;
	}

	/**
	 * This method initializes jButtonExit	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonExit() {
		if (jButtonExit == null) {
			jButtonExit = new JButton();
			jButtonExit.setBounds(new Rectangle(480, 510, 91, 45));
			jButtonExit.setText("EXIT");
			jButtonExit.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {					
					Order1.this.dispose();
				}
			});
		}
		return jButtonExit;
	}

	/**
	 * This method initializes jButtonNext	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonNext() {
		if (jButtonNext == null) {
			jButtonNext = new JButton();
			jButtonNext.setBounds(new Rectangle(391, 510, 83, 45));
			jButtonNext.setText("NEXT");
		}
		return jButtonNext;
	}

	/**
	 * This method initializes jComboBoxColor	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getJComboBoxColor() {
		if (jComboBoxColor == null) {
			jComboBoxColor = new JComboBox();
			jComboBoxColor.setBounds(new Rectangle(169, 286, 147, 32));
			jComboBoxColor.addItem(null);
			jComboBoxColor.addItem("Red");
			jComboBoxColor.addItem("Yellow");
			jComboBoxColor.addItem("White");
			jComboBoxColor.addItem("Orange");
			jComboBoxColor.addItem("Green");
		}
		return jComboBoxColor;
	}

	/**
	 * This method initializes jButtonCustomOrder	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonCustomOrder() {
		if (jButtonCustomOrder == null) {
			jButtonCustomOrder = new JButton();
			jButtonCustomOrder.setBounds(new Rectangle(249, 511, 135, 45));
			jButtonCustomOrder.setText("CUSTOM ORDER");
		}
		return jButtonCustomOrder;
	}

	/**
	 * This method initializes jListResults	
	 * 	
	 * @return javax.swing.JList	
	 */
	private JList getJListResults() {
		if (jListResults == null) {
			jListResults = new JList();
			jListResults.setBounds(new Rectangle(29, 330, 513, 167));
			jListResults.setVisible(false);
		}
		return jListResults;
	}

	/**
	 * This method initializes jProgressBar	
	 * 	
	 * @return javax.swing.JProgressBar	
	 */
	private JProgressBar getJProgressBar() {
		if (jProgressBar == null) {
			jProgressBar = new JProgressBar();
			jProgressBar.setBounds(new Rectangle(135, 520, 106, 23));
			jProgressBar.setVisible(false);
		}
		return jProgressBar;
	}

	/**
	 * This method initializes jButtonSearch	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonSearch() {
		if (jButtonSearch == null) {
			jButtonSearch = new JButton();
			jButtonSearch.setBounds(new Rectangle(360, 286, 136, 32));
			jButtonSearch.setText("Search");
			jButtonSearch.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					jListResults.setVisible(true);
					jProgressBar.setVisible(true);
					int i=0;
					while (i<6000)
						i++;
					jProgressBar.setVisible(false);
				}
			});
		}
		return jButtonSearch;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
